Skip to content

Conversation

@waleedlatif1
Copy link
Collaborator

waleedlatif1 and others added 2 commits October 6, 2025 10:59
…entation (#1555)

* fix(posthog): make instrumentation client not use next-runtime-env

* feat(posthog): added posthog provider
* feat(blog): created first page

* feat(building): first draft blog complete
@vercel
Copy link

vercel bot commented Oct 6, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
sim (staging) Ready Ready Preview Comment Oct 6, 2025 7:31pm
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
docs Skipped Skipped Oct 6, 2025 7:31pm

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Greptile Overview

Summary

This PR introduces two major features: a new blog system and a PostHog analytics provider replacement. The blog system creates the first content page comparing OpenAI AgentKit, n8n, and Sim workflow builders, complete with SEO optimization, structured data markup, and responsive design. The blog is implemented under the `/building` route with proper layouts, redirects, and sitemap integration. The PostHog analytics implementation replaces the previous Next.js instrumentation approach, moving to a React provider pattern that handles runtime environment variables more effectively. This change addresses build-time environment variable issues and provides comprehensive tracking including session recording, performance monitoring, and user behavior analytics.

The blog post serves as a content marketing piece positioning Sim against established competitors, featuring detailed technical comparisons, visual content through optimized images, and extensive SEO metadata. The PostHog provider wraps the entire application to ensure consistent analytics tracking across all pages and user interactions.

Important Files Changed

Changed Files
Filename Score Overview
apps/sim/app/(landing)/components/nav/nav.tsx 5/5 Updated GitHub star count from '15.4k' to '16.3k' in navigation fallback display
apps/sim/app/(landing)/building/layout.tsx 5/5 New layout component for blog section with navigation and footer wrapper
apps/sim/app/sitemap.ts 3/5 Added blog section to sitemap with hardcoded future date that may impact SEO
apps/sim/app/(landing)/building/openai-vs-n8n-vs-sim/openai-n8n-sim.tsx 4/5 Comprehensive blog post component comparing workflow builders with SEO optimization
apps/sim/app/(landing)/building/openai-vs-n8n-vs-sim/page.tsx 5/5 Blog post page with extensive SEO metadata and structured data configuration
apps/sim/app/(landing)/building/page.tsx 5/5 Simple redirect page from /building to the latest blog post
apps/sim/app/layout.tsx 4/5 Replaced Vercel Analytics with PostHog provider in root layout
apps/sim/instrumentation-client.ts 4/5 Removed PostHog initialization and replaced with custom telemetry tracking
apps/sim/lib/posthog/provider.tsx 3/5 New PostHog provider with session recording that captures sensitive data

Confidence score: 3/5

  • This PR introduces new blog functionality and analytics changes that require careful review for SEO and privacy implications
  • Score lowered due to potential SEO issues with future dates in sitemap and privacy concerns with extensive session recording configuration
  • Pay close attention to the sitemap.ts future date and PostHog provider's session recording settings that capture headers and body data

Sequence Diagram

sequenceDiagram
    participant User
    participant Browser
    participant "Sim App"
    participant PostHog
    participant "Telemetry API"
    
    User->>Browser: "Visit /building/openai-vs-n8n-vs-sim"
    Browser->>Browser: "Load client instrumentation"
    Browser->>Browser: "Check telemetry preferences"
    Browser->>PostHog: "Initialize PostHog client"
    
    Browser->>"Sim App": "Request blog page"
    "Sim App"->>"Sim App": "Generate metadata & structured data"
    "Sim App"->>Browser: "Return blog page with SEO data"
    
    Browser->>Browser: "Track page load performance"
    Browser->>PostHog: "Capture pageview"
    Browser->>"Telemetry API": "Send performance metrics"
    
    User->>User: "Read blog content"
    User->>User: "Interact with page elements"
    Browser->>PostHog: "Capture user interactions"
    
    Note over Browser,PostHog: Performance monitoring active
    Browser->>PostHog: "Send web vitals (LCP, CLS, FID)"
    Browser->>"Telemetry API": "Send client-side metrics"
Loading

Additional Comments (1)

  1. apps/sim/instrumentation-client.ts, line 42 (link)

    style: The key in obj check is redundant since the for-in loop already ensures the key exists

9 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

@waleedlatif1 waleedlatif1 merged commit 4dc4073 into main Oct 6, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants